home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre1.z / postgre1 / bench / runwisc.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1993-04-21  |  857 b   |  39 lines

  1. #!/bin/sh
  2. # $HEADER:
  3. # wisconsin.sh - populates and runs the wisconsin benchmark on a database
  4. # named "bench".
  5. #
  6.  
  7. if (test ! -z "$POSTGRESHOME")
  8. then
  9.     PGHOME=$POSTGRESHOME
  10. else
  11.     PGHOME=/usr/postgres
  12. fi
  13.  
  14. POSTGRES=$PGHOME/bin/postgres
  15.  
  16. x=1
  17. for i in query1 query2 query3 query4 query5 query6 query7 query8 query9 \
  18.          query10 query11 query12 query13 query14 query15 query16 query17 \
  19.          query18 query19 query26 query27 query28 query29 query30 query31 \
  20.          query32
  21. do
  22.     echo "retrieve (x=$x)" >> /tmp/pg$$
  23.     cat $i >> /tmp/pg$$
  24.     x=`expr $x + 1`
  25. done
  26.  
  27. #
  28. # the whole benchmark, and the retrieve (x=<i>)'s
  29. #
  30. # Note that in our published benchmark numbers, we executed the command in the
  31. # following fashion:
  32. #
  33. # time $POSTGRES -texecutor -tplanner -f hashjoin -Q bench < /tmp/pg$$
  34. #
  35. #
  36.  
  37. $POSTGRES -texecutor -tplanner -Q bench < /tmp/pg$$
  38.